Encoding and decoding now in libcargo
authorYehuda Katz <wycats@gmail.com>
Fri, 21 Mar 2014 00:55:33 +0000 (17:55 -0700)
committerYehuda Katz <wycats@gmail.com>
Fri, 21 Mar 2014 00:57:34 +0000 (17:57 -0700)
commit1b1044b6392373ac86ff659c976dc499802d5abb
tree19374ce071ee3afec70b9a5d6be6919a32bdb52f
parentaec45be72159d19fc504cf052db8efbecefe9f4f
Encoding and decoding now in libcargo

Commands can now call a simple function (execute_main) with some type
params, and get flags and stdin converted into their expected structs
automatically. Commands that return a json-serializable struct will also
get that struct automatically serialized into the output.

Additionally, error handling is now handled in a central location. If a
command returns a CargoError, its message will be printed (soon in
color!) and its exit code will be used to exit the process.
src/bin/cargo-read-manifest.rs
src/bin/cargo-rustc.rs
src/cargo/mod.rs